//
//  CreateNewDownloadAlertView.swift
//  YoruNeko
//
//  Created by liphone on 2021/6/15.
//

import SwiftUI

struct CreateNewDownloadAlertView: View {
    
    @Binding var urlStr:String
    @Binding var fileName:String
    
    
    var body: some View {
        VStack(alignment:.trailing){
            HStack{
                Text("url:")
                TextField("输入下载url地址", text: $urlStr   ).frame(width:100)
            }
            HStack{
                Text("name:")
                TextField("文件名,如 \"file\"",text: $fileName).frame(width:100)
            }
        }.padding().frame(width: 200, height: 200, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/)
    }
}

struct CreateNewDownloadAlertView_Preview: PreviewProvider{

    @State static private var newTaskUrlStr:String = ""
    @State static private var newTaskFileName:String = ""
    static var previews: some View{
        CreateNewDownloadAlertView(urlStr: $newTaskUrlStr, fileName: $newTaskFileName)
    }
}


